<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets">

<h:head>
	<link type="text/css" rel="stylesheet" 	href="#{request.contextPath}/css/siscob.css" />
</h:head>

<h:form id="frmaluno">
	<p:panel id="aluno" header="Cadastro de Aluno" styleClass="panel" closable="true" closeTitle="Fechar">
		
		<p:messages id="messages" showDetail="true" autoUpdate="true" closable="true" />
		
		<h:panelGrid columns="2" id="grid">
		    <p:outputLabel value="matricula:" for="matricula" />
			<p:inputText id="matricula" required="true" value="#{alunoController.ca.matricula}" />
			<p:outputLabel value="Nome:" for="nome" />
			<p:inputText id="nome" required="true" value="#{alunoController.ca.nome}" maxlength="50" size="60"/>
			<p:outputLabel value="CPF:" for="cpf" />
			<p:inputText id="cpf" value="#{alunoController.ca.cpf}" />
			<p:outputLabel value="Data Nascimento:" for="dataNascimento"/>
			<p:calendar locale="pt" id="dataNascimento" value="#{alunoController.ca.dataNascimento}"/>
			<p:outputLabel value="Endereço:" for="endereco" />
			<p:inputText id="endereco" value="#{alunoController.ca.endereco}" maxlength="50" size="60" />
			<p:outputLabel value="Bairro:" for="bairro" />
			<p:inputText id="bairro" value="#{alunoController.ca.bairro}" maxlength="30" size="40"/>
			<p:outputLabel value="Municipio:" for="municipio" />
			<p:inputText id="municipio" maxlength="30" size="40"
				value="#{alunoController.ca.municipio}" />	
			<p:outputLabel value="Cep:" for="cep" />
			<p:inputText id="cep" maxlength="10" size="10"
				value="#{alunoController.ca.cep}" />	
			<p:outputLabel value="UF:" for="uf" />
			<p:inputText id="uf" maxlength="2" size="3"
				value="#{alunoController.ca.uf}" />
			<p:outputLabel value="Curso:" for="curso" />	
		    <p:inputText id="curso" maxlength="30" size="40"
				value="#{alunoController.ca.curso}" />
			<p:outputLabel value="Turma:" for="turma" />	
		    <p:inputText id="turma" maxlength="30" size="40"
				value="#{alunoController.ca.turma}" />
		   <p:outputLabel value="NumSala:" for="numsala" />	
		    <p:inputText id="numsala" maxlength="3" size="4"
				value="#{alunoController.ca.numsala}" />
			<p:outputLabel value="situacao:" for="situacao" />	
		    <p:inputText id="situacao" maxlength="30" size="40"
				value="#{alunoController.ca.situacao}" />
					
		</h:panelGrid>
		<h:panelGrid columns="2" styleClass="gridButtons">
			<p:commandButton value="Salvar" styleClass="commandbutton"
				action="#{alunoController.cadastrar()}" update="grid" />
			<p:commandButton value="Limpar" styleClass="commandbutton"
				action="#{alunoController.limpar()}" update="grid" />
		</h:panelGrid>
	</p:panel>
</h:form>
</html>